home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / os2 / srefv112.zip / FILTINST.80 < prev    next >
Text File  |  1996-05-29  |  48KB  |  1,183 lines

  1. /* 5/96. this is the SRE-FILTER configuration routine */
  2. /* to add variables:
  3.    1) Create a new Param.nn line (say, Param.30='NEW_CONTROL')
  4.   2) Create a new set of output lines in the DISPLAY THEM  section
  5.   3) Create a new set of output lines in the CHANGE THEM section
  6. */
  7.  
  8. filtinst:
  9. parse  arg ddir ,tempfile, sel, list, verb, uri, user, basedir, workdir
  10.  
  11. list=translate(list, ' ', '+'||'090a0d'x)  /* Whitespace, etc. */
  12.  
  13.  
  14. CHECKIT=1   /* Change this to 0 if you want to enable REMOTE configuration */
  15.  
  16. if checkit<>1 then signal nocheck   /* skip client=server security check */
  17. /* only if user = serveraddress !!! */
  18.    who2=extract('CLIENTADDR')
  19.    saddr2=extract('SERVERADDR')
  20.  
  21. if who2<>saddr2 then do
  22.  
  23.    call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  24.         call lineout tempfile, "<html><head><title>SREFILTER ERROR </title>"
  25.         call lineout tempfile, "</head><body>"
  26.  
  27.    call lineout tempfile,' <strong> Action not allowed remotely.</strong> <pre>'
  28.    call lineout tempfile,' </body> </html> '
  29.    call lineout tempfile
  30.    return 'FILE ERASE TYPE text/html NAME' tempfile
  31. end
  32.  
  33.  
  34. nocheck: nop
  35.  
  36. /* go get initfilt */
  37. aport=extract(serverport)
  38. afile=basedir||"\INITFILT."||aport
  39.  
  40. /* IF THE VERB IS POST-- THEN THIS IS A "WRITE INFO CALL
  41.    IF IT'S GET, THEN ITS A "SHOW INFO" OR "LET ME CHANGE INFO" CALL
  42. */
  43.  
  44. if translate(verb)="POST" then signal write_it
  45.  
  46.  
  47.  
  48. /* IF HERE, VERB=GET --- so show vars or request changes  */
  49.  
  50. parse upper var list foo '=' todo
  51.  
  52.  
  53. /* read initfilt.80 file into internal storage */
  54.  
  55. FOO=fileREAD(AFILE,'FILELINES',,'E')
  56. IF FOO=0 THEN DO
  57.   SAY " FILTINST ERROR: COULD NOT READ INITFILT FILE "
  58.   RETURN String ' Error reading initfilt file '
  59. end
  60.  
  61.  
  62. header1=stuff
  63. /* convert < to < and > to > */
  64.  
  65.  
  66. crlf = '0d0a'x
  67. i=0
  68. do mm=1 to filelines.0
  69.   big=filelines.mm
  70.   if big  <>" " then do
  71.      i=i+1
  72.      flines.i.orig=big
  73.      big=sref_replacestrg(big,'<','<','all')
  74.      big=sref_replacestrg(big,'>','>','all')
  75.      flines.i=big
  76.   end
  77. end
  78. flines.0=i
  79. /* flines now contains the values of the parameters. Parse 'em out... */
  80.  
  81.  
  82. /* the following is a list of parameters that we will adjust */
  83.  
  84.  
  85. /* logon control variables */
  86. param.1="checklog"  /* whether require logon: NO YES ALWAYS INHOUSE*/
  87. param.2="owners"     /* list of owners */
  88. param.3="inhouseips"  /* stem variable of inhouse ips */
  89. param.4="unallowedips" /* stem variable of unallowed ip */
  90.  
  91. /* request string modification variables */
  92. param.5="default"   /* the default page : A file name relative to ddir*/
  93. param.6="check_alias0"  /* NO=Don't, YES=DO, HTM=Check up on HTML actions only*/
  94. param.7="home_dir"    /* the ~ substitution */
  95. param.8="auto_name"  /* list of potential "default documents" for directories */
  96.  
  97. /* access and auditing variables */
  98. param.9="allow_access"   /*File specific: YES=no control, INHOUSE=inhouse only, NO=Superusrs */
  99. param.10="record_option" /*NO=DONT, YES=DO, YES_ALL= Yes, arguments*/
  100. param.11="no_getafile_control" /* YES=free access, INHOUSE=Inhouse users, NO=Superusers */
  101.  
  102. /* stem variables for  REPLACE keyphrase */
  103. param.12="headers"     /* stem variable of headers */
  104. param.13="footers"    /* stem variable of footers */
  105. param.14="inhouse"    /* stem variables for replace inhouse. static variables */
  106. param.15="superuser"  /* stem variables for replace superuser. static variables*/
  107.  
  108. /* static variables for REPLACE keyphrase */
  109. param.16="webmaster"   /* string containing the webmasters url */
  110. param.17="home_name"  /* colloquial name of this server */
  111.  
  112. /* misc. static variables (used for a variety of internally generated messages  */
  113. param.18="inhouse_name"    /* Colloquial name of "inhouse" folks*/
  114. param.19="mess_hit_line" /* variable used with option_hit.n and option_count.n */
  115. param.20="not_found_url" /* string returned with 404 error */
  116.  
  117. /* late additions */
  118. param.21="INHOUSE_PRIVS"
  119. param.22="PUBLIC_PRIVS"
  120. param.23="PUBLIC_FILES"  /* stem var of public files */
  121. param.24="AUTO_HEADER"
  122. param.25="UPLOAD_MAXSIZE"
  123. param.26="UPLOAD_MINFREE"
  124. param.27="NOEXT_TYPE"
  125. param.28="POST_FILTER"
  126. param.29="PRE_FILTER"
  127. param.30="DNS_CHECK"
  128. param.31="SMTP_GATEWAY"
  129.  
  130. param.0=31
  131. do mm=1 to param.0
  132.    param.mm=translate(param.mm)
  133.    param.mm.nvals=0                     /* it might be a stem? */
  134.    param.mm.val=" "
  135. end
  136.  
  137.  
  138. /* the following directories and files are subject to change */
  139. fd.1="messbox_dir"   /* location of message boxes (and recrdall.in in odd cases */
  140. fd.2="tempfile_dir"     /* temporary, working files, directory */
  141. fd.3="counter_file" /* used by REPLACE HITS and REPLACE COUNTS keyphrase */
  142. fd.4="record_all_file" /* used if record_option =YES or YES_ALL */
  143. fd.5="sendfile_file"  /* used by the SENDFILE facility*/
  144. fd.6="access_file"   /* used if ALLOW_ACCESS=YES or INHOUSE*/
  145. fd.7="alias_file"   /* list of aliases */
  146. fd.8="repstrgs_file"  /* custom written variables for REPLACE keyphrase */
  147. fd.9="user_file"    /* username/password/privileges file */
  148. fd.10="interpret_file" /* rexx=code blocks used by the INTERPRET keyphrase */
  149. fd.11="upload_dir"  /* upload directory (used by GET_URL) */
  150. fd.12="upload_log"  /* log file for upload tracking */
  151. fd.13="cgi_bin_dir" /* cgi-bin directory */
  152. fd.14="virtual_file" /* file containing virtual directory information */
  153.  
  154. fd.0=14
  155. do mm=1 to fd.0
  156.    fd.mm=translate(fd.mm)
  157.    fd.mm.val=" "
  158. end
  159.  
  160. /* fhe following will NOT be settable by this program.  Ambitious
  161. users can go into INITFILT.80 themselves:
  162.  
  163. no_include YES means "suppress keyphrase based server side includes
  164.                 (the default is NO-- which means "do the keyphrases )
  165. delim_1.1
  166. delim_2.1   The two sets of delimiters <!-- --> and { } used to
  167. delim_1.2   indicate keyphrases
  168. delim_2.2
  169. ismap_url  The "indicator phrase" used to tell SRE-FILTER that this is
  170.            a mappable image request.
  171. map_pointdist  Maximum distance that a point (in a NCSA map) for it to be
  172.                 selected
  173. servdir    Location of the server (typically, \GOSERV)
  174.  
  175.  
  176. */
  177.  
  178.  
  179. nno=0
  180.  
  181. /* check to see what variable this line matches with */
  182. do mm=1 to flines.0
  183.   parse var flines.mm aname foo '=' aval
  184.   aval=strip(aval)
  185.   aval=strip(aval,,"'")
  186.   aval=strip(aval,,'"')
  187. /* is it a stem variable */
  188.   aname0=translate(aname)
  189.  
  190.   parse var aname0 aname "." anext
  191. /* special treatment for stem variables */
  192.   if anext<>"" then anext=translate(anext)  /* it's a stem variable */
  193.   igot=0
  194.   do mm2=1 to param.0
  195.         if aname=param.mm2 then do
  196.              if anext="" then do
  197.                  param.mm2.val=aval
  198.               end
  199.               else do
  200.                  param.mm2.val.anext=aval
  201.                  param.mm2.nvals=max(param.mm2.nvals,anext)
  202.              end
  203.              igot=mm2
  204.              leave
  205.         end
  206.   end
  207.  
  208. /* if igot=0, not a variable... maybe it's a filename */
  209.   if igot=0 then do
  210.      do mm2=1 to fd.0
  211.         if aname=fd.mm2 then do
  212.              fd.mm2.val=aval
  213.              igot=mm2
  214.              leave
  215.         end
  216.      end
  217.   end
  218.  
  219. /* if igot=0, it's an unmentioned variable or filename.  So, note it's existence */
  220.   if igot=0 then do
  221.      flines.mm=translate(flines.mm.orig, ' ','00090a0d'x)
  222.      IF flines.mm=" " then iterate
  223.      nno=nno+1
  224.      nochangers.nno=flines.mm
  225.   end
  226. end
  227.  
  228. /*****  ---everything is now read in   ----- */
  229.  
  230. /* ************************  DISPLAY THEM --------------------------------*/
  231. if todo="SHOW" then do
  232.   call lineout tempfile," <h2> Current Settings of SRE-FILTER's Parameters </h2> "
  233.  
  234.    call lineout tempfile,"<h3> Variables and file-names  that FILTINST will not change </h3>"
  235.    call lineout tempfile," <em> To change them, you'll have to edit INITFILT."aport
  236.    call lineout tempfile,' </em> <br>'
  237.  
  238.   call lineout tempfile,"<p> Note that lines beginning with a ; are treated as SRE-FILTER comments  <pre>"
  239.    do nn=1 to nno
  240.       dog=nochangers.nn
  241.       DOG=sref_REPLACESTRG(DOG,"<",'<','ALL')
  242.       DOG=sref_REPLACESTRG(DOG,">",'>','ALL')
  243.  
  244.       call lineout tempfile,dog
  245.    end
  246.    call lineout tempfile,'</pre><p> <em> Note: REXX Comments may point to parameter-entry errors! </em> <hr width=30%> '
  247.  
  248.  
  249.  
  250.   call lineout tempfile, ' <h3> Logon Control Variables </h3> '
  251.     do mm=1 to 4
  252.        foo=write_1(mm)
  253.    end
  254.    foo=write_1(30)
  255.  
  256.   call lineout tempfile,' <h3> PUBLIC_FILES </h3> '
  257.    foo=write_1(23)
  258.  
  259.   call lineout tempfile,' <h3> Request string modification variables  </h3>'
  260.     do mm=5 to 8
  261.         if mm=6 then iterate
  262.        foo=write_1(mm)
  263.     end
  264.     foo=write_1(27)
  265.  
  266.    call lineout tempfile,' <h3> Reponse header creation, Pre and Post filters  </h3 '
  267.    foo=write_1(24)
  268.    foo=write_1(28)
  269.    foo=write_1(29)
  270.  
  271.   call lineout tempfile,' <h3> File access and auditing variables  </h3>'
  272.    do mm=9 to 11
  273.        foo=write_1(mm)
  274.     end
  275.     foo=write_1(21)
  276.     foo=write_1(22)
  277.  
  278.  
  279.   call lineout tempfile,' <h3> Stem variables for REPLACE keyphrase </h3> '
  280.    do mm=12 to 15
  281.        foo=write_1(mm)
  282.     end
  283.  
  284.   call lineout tempfile,' <h3> Other variables for REPLACE keyphrase  </h3>'
  285.    do mm=16 to 17
  286.        foo=write_1(mm)
  287.     end
  288.  
  289.   call lineout tempfile, '<h3>Upload control, and E-Mail support, variables </h3>'
  290.   do mm=25 to 26
  291.      foo=write_1(mm)
  292.   end
  293.   foo=write_1(31)
  294.  
  295.   call lineout tempfile,' <h3> Miscellanous variables (used for error messages, etc.) </h3>'
  296.    do mm=18 to 20
  297.        foo=write_1(mm)
  298.     end
  299.  
  300.  
  301.   call lineout tempfile,' <hr width=50%>  <h3> Files and Directories .. </h3>'
  302.   do mm2=1 to 14
  303.     call lineout tempfile, "  <b>" fd.mm2 "</b> =<tt> " fd.mm2.val '</tt><br>'
  304.   end
  305.  
  306.    call lineout tempfile,' <hr> </body> </html> '
  307.     call lineout tempfile
  308.  
  309. end
  310.  
  311.  
  312. /* ****************      CHANGE THEM --------------------------------. */
  313. else do                         
  314.   call lineout tempfile,'<h2>  Change parameter values </h2>'
  315.   call lineout tempfile,'You can change whatever parameter values you wish.  Default values'
  316.   call lineout tempfile,'are shown, and are retained if not explicitily modified.'
  317.   call lineout tempfile,'<p><em> If the explanations here are insufficient, '
  318.   call lineout tempfile,' <a href="/samples/initfilt.doc">INITFILT.DOC</a>'
  319.   call lineout tempfile,'might help!</em>'
  320.   call lineout tempfile,'<HR WIDTH=40%>'
  321.   call lineout tempfile,' <blockquote> For several of these variables, numeric IP '
  322.   call lineout tempfile,' addresses are expected.  If you need to lookup a numeric address:'
  323.   call lineout tempfile,'  <FORM ACTION="!host" METHOD="GET">'
  324.   call lineout tempfile,'  <em> enter the IP name here and Look It Up: </em> '
  325.   call lineout tempfile,'  <INPUT TYPE="text" NAME=""  VALUE=""  SIZE=25 MAXLENGTH=25>'
  326.   call lineout tempfile,'  <INPUT TYPE="submit" VALUE=" Look It Up"> </form> <hr WIDTH=40%>'
  327.  
  328.   call lineout tempfile,'</blockquote><hr> A caution: '
  329.   call lineout tempfile," do not use <code>single quote</code> (<strong>'</strong>) characters (they will cause errors)!"
  330.   call lineout tempfile,'<hr>'
  331.   call lineout tempfile,'<FORM ACTION="filtinst" METHOD="POST">'
  332.  
  333.   call lineout tempfile,' <em> <A NAME="section0">Quick jumps...</A> </em> <br>'
  334.   call lineout tempfile,' <A HREF="#section1">Logon, privileges, and Public Files</A> '
  335.   call lineout tempfile,' <br><A HREF="#section2">Request string modification </A>'
  336.   call lineout tempfile,'<br><A HREF="#section3"> Access and Auditing</A> '
  337.   call lineout tempfile,' <br><A HREF="#section4">Response Header, Pre-filter and Post-Filter, and Uploading</A> '
  338.   call lineout tempfile,' <br><A HREF="#section5">String Replacements</A> '
  339.   call lineout tempfile,'<br><A HREF="#section6"> File & Directory Names</A> '
  340.   call lineout tempfile,'<p> <em> and when you are done.. </em> '
  341.   call lineout tempfile,'<INPUT TYPE="submit" VALUE="make the changes">, '
  342.   call lineout tempfile,' <em> or you can </em> '
  343.   call lineout tempfile,'<INPUT TYPE="reset" VALUE="reset to current values">'
  344.  
  345.  
  346.  
  347.   call lineout tempfile,' <hr width=40%> '
  348.  
  349.   call lineout tempfile,' <H3><a name="section1"> Logon, Privileges, and Public Files </a></H3>'
  350.  
  351.   call lineout tempfile,'<dl>'
  352.  
  353.  
  354. /* CHECKLOG */
  355.  
  356.   call lineout tempfile,'<dt> <strong>CHECKLOG</strong>:'
  357.   v.1="NO" ; v.2="YES" ; v.3="ALWAYS" ; v.4="INHOUSE" ;
  358.   foo=do_radio(1,4)
  359.   call lineout tempfile,'<dd>'
  360.   call lineout tempfile,'CHECKLOG controls the logon-level:'
  361.   call lineout tempfile,'<ul>'
  362.   call lineout tempfile,'<LI>NO : Logon never required'
  363.   call lineout tempfile,'<LI>YES : Logon required for "empty" (home-page) requests'
  364.   call lineout tempfile,'<LI>ALWAYS : Logon required for any request'
  365. call lineout tempfile,'<LI>INHOUSE : Only requesters with predefined, or explicitily granted (in the'
  366. call lineout tempfile,'USERS.IN file) privileges of INHOUSE or SUPERUSER are allowed in.'
  367. call lineout tempfile,'</ul>'
  368.  
  369.  
  370. /* owners */
  371. call lineout tempfile,'<hr><dt> <strong>OWNERS</strong>:'
  372. call lineout tempfile,' <INPUT TYPE="text" NAME="OWNERS" '
  373. call lineout tempfile,'value="' param.2.val '"'
  374. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  375. call lineout tempfile,'<dd>'
  376. call lineout tempfile,'OWNERS is a space delimited list of IP addresses of the OWNERS.  Owners'
  377. call lineout tempfile,'are automatically granted SUPERUSER privileges.'
  378. call lineout tempfile,'<em>Wildcards are NOT allowed in the OWNERS list </em>'
  379.  
  380. /* INHOUEIPS.ips */
  381. foo=""
  382. do mm=1 to param.3.nvals
  383.  if symbol('param.3.val.mm')="VAR" then
  384.      foo=foo||param.3.val.mm||crlf
  385. end
  386. oo=translate(foo,' ','0')
  387. oo=translate(oo, ' ','00090a0d'x)  /* Whitespace, etc. */
  388. if oo= " " then foo=oo
  389.  
  390. call lineout tempfile,'<hr><dt> <strong>INHOUSEIPS.</strong>:'
  391. call lineout tempfile,' <TEXTAREA NAME="'||param.3||'." ROWS=4 COLS=25>'
  392. call lineout tempfile,foo
  393. call lineout tempfile,'</TEXTAREA>'
  394. call lineout tempfile,'<dd>'
  395. call lineout tempfile,' INHOUSEIPS. is a "stem" variable that contains the IP '
  396. call lineout tempfile,' addresses of requesters who will be automatically granted INHOUSE privileges.'
  397. call lineout tempfile,' <br> You should enter each of these addresses on a <bold>;seperate line </bold> .'
  398. call lineout tempfile,' <em> Wildcards (the * character) are allowed</em>'
  399. call lineout tempfile,' <p> In addition, you can put (optional) INHOUSEIP. privileges after the '
  400. call lineout tempfile, ' the IP address. '
  401. call lineout tempfile,' <BR> Examples: <ul> <li> 152.22.12.* <li>515.21.512.51 VIEWMESS PROJ1'
  402. call lineout tempfile,' <li>551.21.512.* </ul> '
  403. call lineout tempfile, ' <br> Note that 515.21.512.51 is granted VIEWMESS and PROJ1 privileges '
  404. call lineout tempfile, " (in addition to the INHOUSE_PRIV's privleges) "
  405.  
  406.  
  407. /*INHOUSE_PRIVS*/
  408. call lineout tempfile,'<hR><dt> <strong>INHOUSE_PRIVS</strong>:'
  409. call lineout tempfile,' <INPUT TYPE="text" NAME="INHOUSE_PRIVS" '
  410. call lineout tempfile,'value="' param.21.val '"'
  411. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  412. call lineout tempfile,'<dd> INHOUSE_PRIVS is a space delimited list of  "extra"'
  413. call lineout tempfile,' privileges to give to OWNERS and to IN-HOUSE requesters.'
  414. call lineout tempfile,' <br>It is <em> highly</em> recommended that <strong>INHOUSE</strong>'
  415. call lineout tempfile,' be included in this list! <p>'
  416. call lineout tempfile,' Example: if you want to give all IN-HOUSE requesters '
  417. call lineout tempfile,' message-box reading privileges, add VIEWMESS to this list.'
  418.  
  419. /*PUBLIC_PRIVS*/
  420. call lineout tempfile,'<hR><dt> <strong>PUBLIC_PRIVS</strong>:'
  421. call lineout tempfile,' <INPUT TYPE="text" NAME="PUBLIC_PRIVS" '
  422. call lineout tempfile,'value="' param.22.val '"'
  423. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  424. call lineout tempfile,'<dd> PUBLIC_PRIVS is a space delimited list of "extra" '
  425. call lineout tempfile,' privileges to give to  everyone. '
  426.  
  427.  
  428. /* Unallowed ips */
  429. foo=""
  430. do mm=1 to param.4.nvals
  431.  if symbol('param.4.val.mm')="VAR" then
  432.     foo=foo||param.4.val.mm||crlf
  433. end
  434. oo=translate(foo,' ','0')
  435. oo=translate(oo, ' ','00090a0d'x)  /* Whitespace, etc. */
  436. if oo= " " then foo=oo
  437. call lineout tempfile,'<hr><dt> <strong>UNALLOWEDIPS.</strong>:'
  438. call lineout tempfile,' <TEXTAREA NAME="'||param.4||'." ROWS=4 COLS=25>'
  439. call lineout tempfile,foo
  440. call lineout tempfile,'</TEXTAREA>'
  441. call lineout tempfile,'<dd>'
  442. call lineout tempfile,' UNALLOWEDIPS. is the "opposite" of INHOUSEIPS. It is a list of '
  443. call lineout tempfile,' the IP addresses of requesters who will NOT be allowed access.'
  444. call lineout tempfile,' Note  INHOUSEIPS. and OWNERS takes precedence over UNALLOWEDIPS.'
  445. call lineout tempfile,' Thus, entering *.*.*.* as an UNALLOWEDIPS. will keep everyone, except '
  446. call lineout tempfile,' OWNERS and INHOUSE requesters, out! '
  447.  
  448. /* DNS_CHECK */
  449.   call lineout tempfile,'<hr><dt> <strong>DNS_CHECK</strong>:'
  450.   v.1="NO" ; v.2="YES"  
  451.   foo=do_radio(30,2)
  452.   call lineout tempfile,'<dd>'
  453.   call lineout tempfile,'DNS_CHECK controls whether a domain name check should occur:'
  454.   call lineout tempfile,'<ul>'
  455.   call lineout tempfile,"<LI>NO : Do not check the user's <tt> IP Name </tt> "
  456.   call lineout tempfile,"<LI>YES : Get the user's <tt> IP Name </tt> (by calling the DNS), and deny access if not found"
  457.   call lineout tempfile,'</ul>'
  458.   call lineout tempfile,' DNS_CHECK=YES  provides extra security, but will slow response time '
  459.   call lineout tempfile, ' (and may keep out legitimate clients with faulty DNS servers).'
  460.  
  461.  
  462. /* public files */
  463. foo=""
  464. do mm=1 to param.23.nvals
  465.  if symbol('param.23.val.mm')="VAR" then
  466.      foo=foo||param.23.val.mm||crlf
  467. end
  468. oo=translate(foo,' ','0')
  469. oo=translate(oo, ' ','00090a0d'x)  /* Whitespace, etc. */
  470. if oo= " " then foo=oo
  471. call lineout tempfile,'<hr><dt> <strong>PUBLIC_FILES.</strong>:'
  472. call lineout tempfile,' <TEXTAREA NAME="'||param.23||'." ROWS=4 COLS=25>'
  473. call lineout tempfile,foo
  474. call lineout tempfile,'</TEXTAREA>'
  475. call lineout tempfile,'<dd>'
  476. call lineout tempfile,' PUBLIC_FILES. is a "stem" variable that contains a '
  477. call lineout tempfile,' list of "publically accessible URLs".  These URLs '
  478. call lineout tempfile,'will be available to all requesters -- no logon or '
  479. call lineout tempfile,'access control is attempted when PUBLIC_FILES are requested.<br>'
  480. call lineout tempfile,'PUBLIC_FILES. entry may include * (for wildcard matching). <br>'
  481. call lineout tempfile,' <em> Note that PUBLIC_FILES. entries  will be checked against your ALIASES)</em>'
  482.  
  483. call lineout tempfile,'</dl>  '
  484. call lineout tempfile,' <hr width=40%>  '
  485. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  486. call lineout tempfile,' <hr width=40%>  '
  487. call lineout tempfile,'  <H3><A name="section2">Request String Modification </a3> </H3>'
  488. call lineout tempfile,' <dl> '
  489.  
  490. /* DEFAULT */
  491. call lineout tempfile,'<p> <dt> <strong>DEFAULT</strong>:'
  492. call lineout tempfile,' <INPUT TYPE="text" NAME="DEFAULT" '
  493. call lineout tempfile,'value="' param.5.val '"'
  494. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  495. call lineout tempfile,'<dd>'
  496. call lineout tempfile,' Enter the name of the HTML document to be used as your '
  497. call lineout tempfile,' "default document" (your home page).  This will be used '
  498. call lineout tempfile,' when an empty request string is recieved. <br>Note that  '
  499. call lineout tempfile,' INDEX.HTM (located in the root of your "data directory") '
  500. call lineout tempfile, ' is often used as the default document.'
  501.  
  502.  
  503. /* CHECK_ALIAS */
  504. /************** make it not easy to change .
  505. call lineout tempfile,'<dd>'
  506. call lineout tempfile,'<hr><dt> <strong>CHECK_ALIAS</strong>:'
  507.   v.1="YES" ; v.2="NO" ; v.3="HTM" 
  508.   foo=do_radio(6,3)
  509. call lineout tempfile,'<dd>CHECK_ALIAS is used to turn on and off the ALIAS checking feature '
  510. call lineout tempfile,'of SRE-FILTER:'
  511. call lineout tempfile,' <UL> <LI> YES = Check all "actions" '
  512. call lineout tempfile,'<LI> HTM = Check requests for HTML documents '
  513. call lineout tempfile,'<LI> NO = Do NOT check   </ul>'
  514. call lineout tempfile,' Note that the ALIASES_FILE (set below) will contain your list of ALIASES.'
  515. ***********/
  516.  
  517. /* HOME_DIR */
  518. call lineout tempfile,'<hR><dt> <strong>HOME_DIR</strong>:'
  519. call lineout tempfile,' <INPUT TYPE="text" NAME="HOME_DIR" '
  520. call lineout tempfile,'value="' param.7.val '"'
  521. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  522. call lineout tempfile,'<dd>'
  523. call lineout tempfile,' HOME_DIR is used when a ~ appears in the request string. '
  524. call lineout tempfile,' Typically, it is a shorthand for a "home directory" --'
  525. call lineout tempfile,' under which personal subdirectories are placed.'
  526.  
  527.  
  528. /* NOEXT_TYPE */
  529. call lineout tempfile,'<hR><dt> <strong>NOEXT_TYPE</strong>:'
  530. v.1="NO" ; v.2="DIR" ; v.3="HTM" ; v.4="HTML"
  531.   foo=do_radio(27,4)
  532. call lineout tempfile,'<dd> NOEXT_TYPE controls how SRE-FILTER handles request that '
  533. call lineout tempfile,' have no extension, that do not have a ? in them, and that do not '
  534. call lineout tempfile,' end with a /.  <ul> <li> NO : Use as is '
  535. call lineout tempfile,' <li>DIR: Treat as directories (append a / to the end) '
  536. call lineout tempfile,' <li> HTM or HTML : Treat as HTML documents (append a '
  537. call lineout tempfile,' .HTM or a .HTML respectively) </ul>'
  538.  
  539.  
  540.  
  541. /* AUTO_NAME */
  542. call lineout tempfile,'<hR><dt> <strong>AUTO_NAME</strong>:'
  543. call lineout tempfile,' <INPUT TYPE="text" NAME="AUTO_NAME" '
  544. call lineout tempfile,'value="' param.8.val '"'
  545. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  546. call lineout tempfile,'<dd>'
  547. call lineout tempfile,' AUTO_NAME is a space delimited list of "default document for directories".'
  548. call lineout tempfile,' It is used when <code>NOEXT_TYPE=DIR</code>, and a  request for a '
  549. call lineout tempfile, 'directory name (an <code>action</code> that ends with a /) is recieved.'
  550. call lineout tempfile,' <br> Notes: <menu> <li> a *.HTM (or *.HTML)  means "use a file called directory_name.htm (or .html) " '
  551. call lineout tempfile, ' (if it exists in the requested directory) '
  552. call lineout tempfile,' <li> !CREATE means "create a list of links to each file in the directory '
  553. call lineout tempfile,' <li> !CREATE*  is the same as !CREATE, but include subdirectories also </menu>'
  554.  
  555.  
  556. call lineout tempfile,'</dl>  '
  557. call lineout tempfile,' <hr width=40%>  '
  558. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  559. call lineout tempfile,' <hr width=40%>  '
  560. call lineout tempfile,'<H3><A name="section3"> Access and Auditing </a></H3>'
  561. call lineout tempfile,'<dl> '
  562.  
  563. /* ALLOW_ACCESS */
  564. call lineout tempfile,'<p><dt> <strong>ALLOW_ACCESS</strong>:'
  565.   v.1="YES" ; v.2="INHOUSE" ; v.3="NO"
  566.   foo=do_radio(9,3)
  567. call lineout tempfile,'<dd>ALLOW_ACCESS turns on and off "action" specific access control'
  568. call lineout tempfile,' <ul> <LI>YES = Do not check (allow all requests to go through'
  569. call lineout tempfile,' <LI> INHOUSE = Check access privileges of everyone except OWNERS or INHOUSE requesters.'
  570. call lineout tempfile,' <LI>  NO = Check access privileges of everyone except OWNERS '
  571. call lineout tempfile, ' (those with SUPERUSER privileges) </ul>'
  572. call lineout tempfile,' Notes: <menu><li> ALLOW_ACCESS uses the ACCESS_FILE to store file-specific access information'
  573. call lineout tempfile,' <li> The <var>SSI_ALLOW</var> (and <var>SSP_ALLOW</var>) variable controls if server side includes (processing) '
  574. call lineout tempfile,' are permittted (on a file-by-file basis).  </ul>'
  575.  
  576. /* no_getafile_control */
  577. call lineout tempfile,'<hr><dt> <strong>NO_GETAFILE_CONTROL</strong>:'
  578.   v.1="YES" ; v.2="INHOUSE" ; v.3="NO"
  579.   foo=do_radio(11,3)
  580. call lineout tempfile,'<dd>NO_GETAFILE_CONTROL controls the availability of the GETAFILE file display facility'
  581. call lineout tempfile,' <ul> <LI>YES = No controls, everyone can use it.'
  582. call lineout tempfile,' <LI> INHOUSE = Only INHOUSE users and OWNERS (SUPERUSERS) can use GETAFILE '
  583. call lineout tempfile,' <LI>  NO = Only OWNERS (SUPERUSERS) can use GETAFILE.</ul>'
  584. call lineout tempfile,' Note that you can accomplish the same thing through careful use of ALIASES '
  585. call lineout tempfile,' or via an entry in ALL_FILE '
  586. call lineout tempfile,' (you may also want to investigate the use of the SENDFILE option in GETAFILE)'
  587.  
  588.  
  589. /*RECORD_OPTION */
  590. call lineout tempfile,'<hr><dt> <strong>RECORD_OPTION</strong>:'
  591.   v.1="YES" ; v.2="YES_ALL" ; v.3="NO"
  592.   foo=do_radio(10,3)
  593. call lineout tempfile,'<dd> RECORD_OPTION turns on and off "recording all requests"'
  594. call lineout tempfile,' <ul> <LI>YES = Record all requests, but remove arguments (such as <code>?xxx</code>) first'
  595. call lineout tempfile,' <LI>YES_ALL = Record all requests, but do not remove "arguments" '
  596. call lineout tempfile,' (this can lead to a lot of unique entries!) '
  597. call lineout tempfile,' <LI>  NO = Do not record all requests </ul>'
  598. call lineout tempfile,' Notes: <br>'
  599. call lineout tempfile,' i) RECORD_OPTIONS uses the RECORD_ALL_FILE to keep track of the number '
  600. call lineout tempfile,' of requests recieved, and the date of the most recent request.<br>'
  601. call lineout tempfile,' ii) Requests that are not "honored" (due to logon or access constraints) are NOT recorded'
  602.  
  603.  
  604. call lineout tempfile,'</dl>  '
  605. call lineout tempfile,' <hr width=40%>  '
  606. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  607. call lineout tempfile,' <hr width=40%>  '
  608. call lineout tempfile,' <H3><a name="section4">Response Header, Pre-filter, and Uploading </a></H3>'
  609. call lineout tempfile,' <dl> '
  610.  
  611.  
  612. /*AUTO_HEADER */
  613. call lineout tempfile,'<p><dt> <strong>AUTO_HEADER</strong>:'
  614.   v.1="NO" ; v.2="HEAD" ; v.3="ALWAYS"
  615.   foo=do_radio(24,3)
  616. call lineout tempfile,'<dd> AUTO_HEADER controls the "automatic creation of response headers"'
  617. call lineout tempfile,'<ul> <LI>NO = Do not create additional response headers '
  618. call lineout tempfile,'<LI>HEAD = Automatic creation of response headers for HEAD requests'
  619. call lineout tempfile,'<LI>ALWAYS= Automatic creation of response headers fo GET and  HEAD requests'
  620. call lineout tempfile,'</ul> Note: When active, LINK and META HTTP-EQUIV elements found in the '
  621. call lineout tempfile,'<HEAD> portion of an HTML document are used to generate additional response headers'
  622.  
  623. /*PRE_FILTER */
  624. call lineout tempfile,'<hr><dt> <strong>PRE_FILTER</strong>:'
  625.   v.1="NO" ; v.2="YES" ; v.3="FIRST"
  626.   foo=do_radio(29,3)
  627. call lineout tempfile,'<dd> PRE_FILTER controls whether the PREFILTR  "pre-filter" is called '
  628. call lineout tempfile,' before SRE-FILTER processes the request .'
  629. call lineout tempfile,' <ul> <li> NO = Do not call a pre-filter '
  630. call lineout tempfile,'  <li> YES =Call a pre-filter after ascertaining logon rights'
  631. call lineout tempfile,' <li> FIRST = Call a pre-filter before anything else </ul>'
  632. call lineout tempfile,' If PRE_FILTER equals YES or FIRST, the PREFILTR procedure (in PREFILTR.80)'
  633. call lineout tempfile,' will be called. SRE-FILTER comes with a sample PREFILTR that implements'
  634. call lineout tempfile,' the GoRemote server remote control package. '
  635.  
  636. /*POST_FILTER */
  637. call lineout tempfile,'<hr><dt> <strong>POST_FILTER</strong>:'
  638.   v.1="YES" ; v.2="NO"
  639.   foo=do_radio(28,2)
  640. call lineout tempfile,'<dd> POST_FILTER instructs SRE-FILTER to call a "post-filter"'
  641. call lineout tempfile,' <ul> <LI>YES = Call POSTFILT (a custom-written REXX procedure in POSTFILT.80).'
  642. call lineout tempfile,' <LI>NO = do not call </ul>'
  643. call lineout tempfile,' If POST_FILTER=YES, then POSTFILT will be called <strong>after</strong>'
  644. call lineout tempfile,' the response has been sent to the client '
  645.  
  646. /*SMTP_GATEWAY */
  647. call lineout tempfile,'<hr><dt> <strong>SMTP_GATEWAY</strong>:'
  648. call lineout tempfile,' <INPUT TYPE="text" NAME="SMTP_GATEWAY" '
  649. call lineout tempfile,'value="' param.31.val '"'
  650. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  651. call lineout tempfile,"<dd> SMTP_GATEWAY is used by SRE-FILTER's <em>e-mail alert</em> facility "
  652. call lineout tempfile," (contained in the default POSTFILT.80). "
  653. call lineout tempfile,' SMTP_GATEWAY should contain the name of your SMTP mail server. <br> '
  654. call lineout tempfile,' If you do not know it, or do not need to use e-mail alerts, leave this field empty (or set it to 0)<p>'
  655. call lineout tempfile,' For more details on SMTP_GATEWAY, see POSTFILT.80 '
  656.  
  657. /* UPLOAD_Minfree and upload_maxsize */
  658. call lineout tempfile,' <hr> <dt> <strong> UPLOAD_MINFREE: '
  659. call lineout tempfile,' <INPUT TYPE="text" NAME="UPLOAD_MINFREE" '
  660. call lineout tempfile,'value="' param.26.val '" '
  661. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  662. call lineout tempfile,' , and UPLOAD_MAXSIZE: </strong>'
  663. call lineout tempfile,' <INPUT TYPE="text" NAME="UPLOAD_MAXSIZE" '
  664. call lineout tempfile,', value="' param.25.val '" '
  665. call lineout tempfile,' SIZE=10 MAXLENGTH=10>'
  666. call lineout tempfile,'<dd>'
  667. call lineout tempfile,' The UPLOAD_ variables are needed when GET_URL is used to upload '
  668. call lineout tempfile,' files from another server. <pr>'
  669. call lineout tempfile,' UPLOAD_MINFREE is the amount of space (in K bytes) that must be free '
  670. call lineout tempfile,' in the UPLOAD_DIRECTORY <em> after </em> the file has been uploaded.'
  671. call lineout tempfile,' <br> UPLOAD_MAXSIZE is the maximum allowable size (in K bytes) of a uploaded file '
  672. call lineout tempfile, '<p> If either of these limits are exceeded, the file will <strong> not </strong> be uploaded.'
  673.  
  674.  
  675.  
  676.  
  677. call lineout tempfile,'</dl>  '
  678. call lineout tempfile,' <hr width=40%>  '
  679. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  680. call lineout tempfile,' <hr width=40%>  '
  681. call lineout tempfile,' <h3> <a name="section5">  String Replacements </a> </h3>'
  682. call lineout tempfile,' <dl> '
  683.  
  684. /* headers */
  685. foo=""
  686. do mm=1 to param.12.nvals
  687.  if symbol('param.12.val.mm')="VAR" then
  688.     foo=foo||param.12.val.mm||crlf
  689. end
  690. oo=translate(foo,' ','0')
  691. oo=translate(oo, ' ','00090a0d'x)  /* Whitespace, etc. */
  692. if oo= " " then foo=oo
  693. call lineout tempfile,'<p><dt> <strong>HEADERS.</strong>:'
  694. call lineout tempfile,' <TEXTAREA NAME="'||param.12||'." ROWS=4 COLS=25>'
  695. call lineout tempfile,foo
  696. call lineout tempfile,'</TEXTAREA>'
  697. call lineout tempfile,'<dd> HEADERS. are added to the top of all requested HTML '
  698. call lineout tempfile,' documents (they are added just after the first <BODY> tag).'
  699.  
  700. call lineout tempfile,' You should enter valid HTML code in this box '
  701. call lineout tempfile,' (or leave it blank if you do not want a HEADER added). '
  702. call lineout tempfile,' Note that HEADERS can contain keyphrases. '
  703.  
  704. /* footers */
  705. foo=""
  706. do mm=1 to param.13.nvals
  707.  if symbol('param.13.val.mm')="VAR" then
  708.     foo=foo||param.13.val.mm||crlf
  709. end
  710. oo=translate(foo,' ','0')
  711. oo=translate(oo, ' ','00090a0d'x)  /* Whitespace, etc. */
  712. if oo= " " then foo=oo
  713. call lineout tempfile,'<hr><dt> <strong>FOOTERS.</strong>:'
  714. call lineout tempfile,' <TEXTAREA NAME="'||param.13||'." ROWS=4 COLS=25>'
  715. call lineout tempfile,foo
  716. call lineout tempfile,'</TEXTAREA>'
  717. call lineout tempfile,'<dd> FOOTERS. are added to the top of all requested HTML '
  718. call lineout tempfile,' documents (they are added just before  the last </BODY> tag).'
  719. call lineout tempfile,' You should enter valid HTML code in this box '
  720. call lineout tempfile,'(or leave it blank if you do not want a FOOTER added). '
  721. call lineout tempfile,' Note that FOOTERS can contain keyphrases. '
  722.  
  723. /* inhouse. */
  724. foo=""
  725. do mm=1 to param.14.nvals
  726.  if symbol('param.14.val.mm')="VAR" then
  727.     foo=foo||param.14.val.mm||crlf
  728. end
  729. oo=translate(foo,' ','0')
  730. oo=translate(oo, ' ','00090a0d'x)  /* Whitespace, etc. */
  731. if oo= " " then foo=oo
  732. call lineout tempfile,'<hr><dt> <strong>INHOUSE.</strong>:'
  733. call lineout tempfile,' <TEXTAREA NAME="'||param.14||'." ROWS=4 COLS=65>'
  734. call lineout tempfile,foo
  735. call lineout tempfile,'</TEXTAREA>'
  736. call lineout tempfile,'<dd> The INHOUSE. variable(s) are used by the REPLACE INHOUSE.n keyphrase'
  737. call lineout tempfile,' Each line of this box corresponds to a different value of n '
  738. call lineout tempfile,' -- the first line is for INHOUSE.1, the second for INHOUSE.2, etc.'
  739.  
  740. /* SUPERUSER. */
  741. foo=""
  742. do mm=1 to param.15.nvals
  743.  if symbol('param.15.val.mm')="VAR" then
  744.     foo=foo||param.15.val.mm||crlf
  745. end
  746. oo=translate(foo,' ','0')
  747. oo=translate(oo, ' ','00090a0d'x)  /* Whitespace, etc. */
  748. if oo= " " then foo=oo
  749. call lineout tempfile,'<hr><dt> <strong>SUPERUSER.</strong>:'
  750. if strip(foo)=0 then foo=" "
  751. call lineout tempfile,' <TEXTAREA NAME="'||param.15||'." ROWS=4 COLS=65>'
  752. call lineout tempfile,foo
  753. call lineout tempfile,'</TEXTAREA>'
  754. call lineout tempfile,'<dd> The SUPERUSER. variable(s) are used by the REPLACE SUPERUSER.n keyphrase'
  755. call lineout tempfile,' Each line of this box corresponds to a different value of n '
  756. call lineout tempfile,' -- the first line is for SUPERUSER.1, the second for SUPERUSER.2, etc.'
  757.  
  758.  
  759. /* webmaster */
  760. call lineout tempfile,'<hR><dt> <strong>WEBMASTER</strong>:'
  761. call lineout tempfile, ' <TEXTAREA NAME="WEBMASTER" ROWS=1 COLS=68>' param.16.val
  762. call lineout tempfile, ' </TEXTAREA>'
  763. call lineout tempfile,'<dd>'
  764. call lineout tempfile,' The WEBMASTER variable is used in the REPLACE WEBMASTER keyphrase,'
  765. call lineout tempfile,' and is used in some internally generated messages.  It should contain'
  766. call lineout tempfile,' a contact address (preferably as a MAILTO URL) of the site''s "webmaster"'
  767.  
  768.  
  769. /*HOME_NAME */
  770. call lineout tempfile,'<hR><dt> <strong>HOME_NAME</strong>:'
  771. call lineout tempfile,' <INPUT TYPE="text" NAME="HOME_NAME" '
  772. call lineout tempfile,'value="' param.17.val '"'
  773. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  774. call lineout tempfile,'<dd>'
  775. call lineout tempfile,' HOME_NAME is used in the REPLACE HOME_NAME keyphrase, and  is'
  776. call lineout tempfile,' used in the default Not Found response (see below).  It should contain the '
  777. call lineout tempfile,' commonly-used name of your organization (not necessarily the IP name!)'
  778.  
  779.  
  780. /*INHOUSE_NAME */
  781. call lineout tempfile,'<hR><dt> <strong>INHOUSE_NAME</strong>:'
  782. call lineout tempfile,' <INPUT TYPE="text" NAME="INHOUSE_NAME" '
  783. call lineout tempfile,'value="' param.18.val '"'
  784. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  785. call lineout tempfile,'<dd>'
  786. call lineout tempfile,' INHOUSE_NAME is used in some internally generated messages.'
  787. call lineout tempfile,'  It should contain a brief (not necessarily IP) name of your "domain"'
  788. call lineout tempfile,' Note that HOME_NAME is the name that the general public should know you by,'
  789. call lineout tempfile,' while the INHOUSE_NAME '
  790. call lineout tempfile,' is more of a "name of a common group of Web Users".  The difference is subtle,'
  791. call lineout tempfile,' and one could use the same value for both variables. '
  792.  
  793.  
  794.  
  795. /*MESS_HIT_LINE */
  796. call lineout tempfile,'<hR><dt> <strong>MESS_HIT_LINE</strong>:'
  797. call lineout tempfile,' <INPUT TYPE="text" NAME="MESS_HIT_LINE" '
  798. call lineout tempfile,'value="' param.19.val '"'
  799. call lineout tempfile,' SIZE=30 MAXLENGTH=80>'
  800. call lineout tempfile,'<dd> MESS_HIT_LINE is used by the REPLACE OPTION_HITS.n keyphrase'
  801.  
  802.  
  803. /*NOT_FOUND_URL */
  804. call lineout tempfile,'<hR><dt> <strong>NOT_FOUND_URL</strong>:'
  805. call lineout tempfile, ' <TEXTAREA NAME="NOT_FOUND_URL" ROWS=1 COLS=60>' param.20.val
  806. call lineout tempfile, ' </TEXTAREA>'
  807. call lineout tempfile,'<dd> NOT_FOUND_URL is a string that is displayed when a Not Found '
  808. call lineout tempfile,' response is generated (say, when a requested file can not be found).'
  809. call lineout tempfile,' Typically it will contain a link to your home page, or some other ';
  810. call lineout tempfile,' "catchall" document.  Note that HOME_NAME is used in the default '
  811. call lineout tempfile,' definition of NOT_FOUND_URL '
  812.  
  813.  
  814. call lineout tempfile,' </dl> '                 /* END OF PARAMTERS LIST */
  815. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  816.  
  817.  
  818.  
  819. /* === File info SECTION === */
  820. call lineout tempfile,'<hr> <h3> <a name="section6"> File & Directory Names </a> </h3>'
  821. call lineout tempfile,'<dl> <dt> <br> ' fd.1 ' = '
  822. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.1||'"  VALUE="'||fd.1.val||'"  '
  823. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  824. Call lineout tempfile,' <dd> The MESSBOX_DIR is where the SRE-FILTER message boxes are stored'
  825.  
  826. call lineout tempfile,'<dt> <br> ' fd.2 ' = '
  827. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.2||'"  VALUE="'||fd.2.val||'"  '
  828. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  829. Call lineout tempfile,' <dd> The TEMPFILE_DIR is where "transient" files should be created '
  830.  
  831.  
  832. call lineout tempfile,'<dt> <br> ' fd.11 ' = '
  833. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.11||'"  VALUE="'||fd.11.val||'"  '
  834. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  835. Call lineout tempfile,' <dd> The UPLOAD_DIR is where "uploaded" files will be put. '
  836.  
  837. call lineout tempfile,'<dt> <br> ' fd.13 ' = '
  838. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.13||'"  VALUE="'||fd.13.val||'"  '
  839. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  840. Call lineout tempfile,' <dd> The CGI_BIN_DIR is where "CGI-BIN" programs should be stored. '
  841.  
  842.  
  843.  
  844. call lineout tempfile,'<dt> <br> ' fd.3 ' = '
  845. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.3||'"  VALUE="'||fd.3.val||'"  '
  846. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  847. Call lineout tempfile,' <dd> The COUNTER_FILE is where the REPLACE HITS and REPLACE COUNTS '
  848. call lineout tempfile,' keyphrases store the "number of hits" statistics. '
  849.  
  850.  
  851. call lineout tempfile,'<dt> <br> ' fd.4 ' = '
  852. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.4||'"  VALUE="'||fd.4.val||'"  '
  853. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  854. Call lineout tempfile,' <dd> The RECORD_ALL_FILE is where the RECORD_OPTIONS stores the '
  855. call lineout tempfile,' "number of hits " statistics. '
  856.  
  857.  
  858.  
  859. call lineout tempfile,'<dt> <br> ' fd.5 ' = '
  860. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.5||'"  VALUE="'||fd.5.val||'"  '
  861. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  862. Call lineout tempfile,' <dd> The SENDFILE_FILE is where the SENDFILE facility stores "number of hits"'
  863. call lineout tempfile,' statistics" and access information '
  864.  
  865.  
  866. call lineout tempfile,'<dt> <br> ' fd.12 ' = '
  867. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.12||'"  VALUE="'||fd.12.val||'"  '
  868. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  869. Call lineout tempfile,' <dd> The UPLOAD_LOG is where information on uploaded files '
  870. call lineout tempfile,' will be stored.  If you do not want to store such info, enter <strong>0</strong> '
  871.  
  872.  
  873.  
  874. call lineout tempfile,'<dt> <br> ' fd.6 ' = '
  875. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.6||'"  VALUE="'||fd.6.val||'"  '
  876. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  877. Call lineout tempfile,' <dd> The ACCESS_FILE is where  ALLOW_ACCESS looks for action-specific'
  878. call lineout tempfile,' access information'
  879.  
  880.  
  881. call lineout tempfile,'<dt> <br> ' fd.7 ' = '
  882. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.7||'"  VALUE="'||fd.7.val||'"  '
  883. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  884. Call lineout tempfile,' <dd> The ALIAS_FILE contains the lists of ALIASES '
  885.  
  886. call lineout tempfile,'<dt> <br> ' fd.14 ' = '
  887. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.14||'"  VALUE="'||fd.14.val||'"  '
  888. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  889. Call lineout tempfile,' <dd> The VIRTUAL_FILE contains the "virtual directory" list '
  890.  
  891. call lineout tempfile,'<dt>  <br> ' fd.8 ' = '
  892. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.8||'"  VALUE="'||fd.8.val||'"  '
  893. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  894. Call lineout tempfile,' <dd> The REPSTRGS_FILE contains the list of custom "variable names" '
  895. call lineout tempfile,' for use by the REPLACE keyphrase '
  896.  
  897.  
  898. call lineout tempfile,'<dt> <br> ' fd.9 ' = '
  899. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.9||'"  VALUE="'||fd.9.val||'"  '
  900. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  901. Call lineout tempfile,' <dd> The USER_FILE contains logon/password/privileges information '
  902.  
  903.  
  904.  
  905. call lineout tempfile,'<dt> <br> ' fd.10 ' = '
  906. call lineout tempfile,'<INPUT TYPE="text" NAME="'||fd.10||'"  VALUE="'||fd.10.val||'"  '
  907. call lineout tempfile,' SIZE=30 MAXLENGTH=60>'
  908. Call lineout tempfile,' <dd> The INTERPRET_FILE contains the "REXX-code blocks" used by the '
  909. call lineout tempfile,' INTERPRET keyphrase '
  910.  
  911. call lineout tempfile,'</dl>'           /* end OF FILE INFO SECTION */
  912.  
  913. call lineout tempfile,' <A HREF="#section0"><EM>go to top of document</EM></A> '
  914.  
  915.  
  916. /* and keep track of the nochangers */
  917.  
  918.  do bob=1 to nno
  919.     DOG=NOCHANGERS.BOB
  920.     if dog=" " then iterate
  921.     DOG=sref_REPLACESTRG(DOG,'"','%22','ALL')
  922.     DOG=sref_REPLACESTRG(DOG,"'",'%27','ALL')
  923.     DOG=sref_REPLACESTRG(DOG,"+",'%2B','ALL')
  924.  
  925.     DOG=sref_REPLACESTRG(DOG,"<",'%3c','ALL')
  926.     DOG=sref_REPLACESTRG(DOG,">",'%3e','ALL')
  927.  
  928.     DOG=translate(DOG,"+",' ')
  929.  
  930.    call lineout tempfile,'<INPUT TYPE="hidden" NAMe="NOCHANGE" value="'||DOG||'" >'
  931.  end
  932.  
  933.  
  934.   call lineout tempfile,'<p> <EM>if you are done you can</EM> <INPUT TYPE="submit" VALUE="make the changes">,'
  935.   call lineout tempfile,' <EM>or you can </EM><INPUT TYPE="reset" VALUE="reset to current values">'
  936.   call lineout tempfile,'</FORM>'
  937.   call lineout tempfile,' <hr> </body> </html> '
  938.   call lineout tempfile
  939. end
  940.  
  941. return 'FILE ERASE TYPE text/html NAME' tempfile
  942.  
  943.  
  944.  
  945.  
  946.  
  947. /****************************************************/
  948. /*  JUMP HERE ON POST CALLS, which are always "write info" calls */
  949. /* you should never need to modify this */
  950.  
  951. write_It:   nop
  952. crlf = '0d0a'x
  953.  
  954.  
  955.  call lineout tempfile, '<!doctype html public "-//IETF//DTD HTML 3.0//EN">'
  956.         call lineout tempfile, "<html><head><title>FILTINST Results </title>"
  957.         call lineout tempfile, "</head><body>"
  958.         call lineout tempfile,' <h1> SRE-FILTER Configurator </h1> '
  959.  
  960. foo=stream(afile,'c','query exists')
  961. if foo="" then
  962.    call lineout tempfile,' Warning: Old INITFILT.'aport ' did not exist '
  963.  
  964. else do
  965.  
  966. /* rename current initfilt.80 */
  967. /* see what old initifits there are */
  968.       afile2="INITFILT.B10"      /* use in case of weirdness */
  969.  
  970.       afilexx=basedir||'\INITFILT.B*'
  971.       rc=sysfiletree(afilexx,initfils,'FT')
  972.       select
  973.         when rc<>0 then   do              /* error, just use .b1 */
  974.           afile2=basedir||'\INITFILT.B1'
  975.           say " INITFILT backup: SysFileTree error, using INITFILT.B1 "
  976.         end
  977.         when initfils.0=0 then do
  978.           say " Creating first backup of INITFILT"
  979.           afile2=basedir||'\INITFILT.B1'
  980.         end
  981.         when initfils.0 >= 10 then do       /* delete oldest */
  982.              isold=translate(word(iniTfils.1,1),'jihgfedcba','9876543210')
  983.              aname=word(initfils.1,4) ; aname3=aname
  984.              ISOLD1=1
  985.              do mm=2 to iniTfils.0
  986.                 adate=translate(word(iniTfils.mm,1),'jihgfedcba','9876543210')
  987.                 aname=word(iniTfils.mm,4)
  988.                 if adate<isold then do 
  989.                       isold=adate ; isold1= mm ; aname3=aname 
  990.                 end
  991.              end 
  992.              afile2=aname3
  993.              Say " Backup INITFILT using oldest " aname3
  994.       end
  995.       otherwise do                      /* find first missing number from 1... 10 */
  996.  
  997.          do oy=1 to 10 ; alist.oy=0 ; end
  998.          do ji=1 to initfils.0
  999.              aname=word(iniTfils.ji,4)
  1000.              do oy=1 to 10
  1001.                  oy2=".B"||oy
  1002.                  if pos(oy2,translate(aname))>0 then do
  1003.                       alist.oy=1
  1004.                       leave
  1005.                   end
  1006.              end
  1007.          end
  1008.          do ji=1 to 10
  1009.             if alist.ji=1 then iterate
  1010.              hoy=".B"||ji
  1011.              afile2=basedir||"\INITFILT"||hoy
  1012.              say " Backup INITFILT using " afile2
  1013.              leave
  1014.           end          
  1015.       end              
  1016.  
  1017.    end                 /* select */
  1018.  
  1019. /* now copy old initfilt.80 to afile2 */
  1020.       goo=charin(afile,1,chars(afile))
  1021.       ause=stream(afile,'c','close')
  1022.       ause=stream(afile2,'c','OPEN WRITE')  /* write out results */
  1023.       if ause>0 then do
  1024.           foo=charout(afile2,goo,1)
  1025.       end
  1026.       ause=stream(afile2,'c','close')
  1027.  
  1028.       foo=sysfiledelete(afile)
  1029.       if foo<>0 then do
  1030.           call lineout tempfile,'<p> Error, could not remove old INITFILT.'aport ' file (rc= ' foo
  1031.           signal alldone
  1032.       end
  1033.       else
  1034.            call lineout tempfile,' <p> Old INITFILT.'aport '  is now ' afile2
  1035.  
  1036. end
  1037.  
  1038. /* Check for arguments.  Note that if no arguments, error. */
  1039.  
  1040. igot=0 ; notc=0
  1041. do until list = ""
  1042.    parse var list anopt '&' list
  1043.    anopt=packur(anopt)
  1044.    parse var anopt aname '=' aval
  1045.    
  1046.    if pos('.',aname)=0 then do
  1047.        select
  1048.          when translate(aname)="COMMENT" then
  1049.              thecomment=aval
  1050.          when translate(aname)="NOCHANGE" then do
  1051.              aval=translate(aval,' ','+'||'090a0d'x)
  1052.              AVAL=PACKUR(AVAL)
  1053.  
  1054.              IF AVAL= " " THEN ITERATE
  1055.              notc=notc+1
  1056.              nochan.notc=aval
  1057.          END
  1058.          otherwise do
  1059.             aval=translate(aval,' ','+'||'090a0d'x)
  1060.              AVAL=PACKUR(AVAL)
  1061.  
  1062.             igot=igot+1
  1063.             llist.igot=aname||"="||" '"||aval||"' "
  1064.          end
  1065.        end                      /*select */
  1066.    end
  1067.    else do                      /* a stem var? */
  1068.        iboy=0
  1069.        do until aval=""
  1070.            parse var aval avalu (crlf) aval
  1071.            avalu=strip(translate(avalu, ' ','00090d0a'x))
  1072.            AVALu=PACKUR(AVALu)
  1073.            if avalu="" then iterate
  1074.            iboy=iboy+1 
  1075.            igot=igot+1
  1076.            llist.igot=aname||iboy||"=  '"||avalu||"' "
  1077.         end
  1078.         if iboy=0 then do  /* empy, given it a value of 0 */
  1079.            igot=igot+1
  1080.            llist.igot=aname||"1=0   "
  1081.         end
  1082.  
  1083.     end                 /* stem var */
  1084. end
  1085.  
  1086.  
  1087. /* double check for errors */
  1088. itisbad=0
  1089. do kk=1 to igot
  1090.   writeme=check_it_out(llist.kk)
  1091.  
  1092.  if itisbad=1 then do
  1093.     call lineout tempfile,'<p><strong> Warning: </strong>Error at: ' llist.kk
  1094.     call lineout tempfile,' <br><em> You should  rerun  FILTINST and correct it! </em>'
  1095.   end
  1096.  
  1097.   badguys=itisbad
  1098.   call lineout afile,writeme
  1099.  
  1100. end
  1101.  
  1102. call lineout afile,' '
  1103. do mm=1 to nOTC
  1104.   call LINEOUT AFILE,NOCHAN.MM
  1105. END
  1106.  
  1107.  
  1108. alldone:
  1109. call lineout tempfile,' <hr> </body> </html> '
  1110. call lineout tempfile
  1111.  
  1112. return 'FILE ERASE TYPE text/html NAME' tempfile
  1113.  
  1114.  
  1115. *****/
  1116. check_it_out: procedure expose itisbad
  1117. parse arg thang
  1118.   itisbad=0
  1119.   signal on syntax name badline    /* ugly4 down below */
  1120.   interpret thang
  1121.   signal okayline
  1122.  
  1123. badline:
  1124.   signal off syntax
  1125.   itisbad=1
  1126.  
  1127. okayline: nop
  1128.  
  1129.  if itisbad=0 then
  1130.     dog=thang
  1131.  else
  1132.     dog='/* '|| thang || ' */'
  1133.  
  1134. return dog
  1135.  
  1136.  
  1137. /**********/
  1138. /* --- create a row of radio buttons */
  1139. do_radio: procedure expose param. v. tempfile
  1140. parse arg ith,inlist
  1141. do mm=1 to inlist
  1142.     if v.mm=param.ith.val then do
  1143.           v2.mm="CHECKED" 
  1144.           isit=mm
  1145.      end
  1146.      else  do
  1147.         v2.mm=' '
  1148.      end
  1149. end
  1150. do mm=1 to inlist
  1151.    call lineout tempfile,' <INPUT TYPE=RADIO NAME="'||param.ith||'" '
  1152.    call lineout tempfile,' VALUE="'   ||v.mm||  '" '  ||v2.mm||  '>'   v.mm  '      , '
  1153. end
  1154. return isit
  1155.  
  1156.  
  1157.  
  1158. /***************/
  1159. /* write out values for a variable (or a stem variable ) */
  1160. write_1:
  1161. parse arg iat
  1162. ndo=param.iat.nvals
  1163. if ndo=0 then do                /*not a stem var */
  1164.     call lineout tempfile, "  <b>" param.iat "</b> =<tt> " param.iat.val '</tt> <br>'
  1165. end
  1166. else do
  1167.   do jmm2=1 to ndo
  1168.        call lineout tempfile, "  <b>" param.iat "." jmm2
  1169.  
  1170.       if symbol('PARAM.IAT.VAL.JMM2')='VAR' then
  1171.            call lineout tempfile, "</b> =<tt> " param.iat.val.jmm2 '</tt> <br>'
  1172.        ELSE
  1173.            call lineout tempfile, "</b> =<EM>  missing! </em> <br>"
  1174.  
  1175.   end
  1176. end
  1177. return 1
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.